non_package_files/Examples___/ITplot & DRC howto.R

# in this file, we make a drc. 
# it is also an example how to do it. 
# this could be a non-interactive test, but the output of the plots shoud be revied. 


herg<-examplefile("herg")
get_treeinfo(herg) %>% showtree


library(ephys2)
  tree <- get_treeinfo("non_package_files/VG_Blocker.dat")
tree_ <- reorder_tree(tree, channels = 1:8)
# showtree(tree_)

set_cursor("NaPharm", "min", curMin_, c(0.01,0.02))
s<-getSeries(tree_,1,1,7)

s$plot()
# alternative:
# plot(s$sweeps)

# add lp info:

s$add_lpinfo(c(1,3,10, 100, 300, 1000), c(5,15,15,15,15,13), "Lidocaine")

# show results table
head(s$results())

# annotated IT plot:
s$plotIt("min")
drcdata<-s$It("min"); title("I/t plot showing liquid peridod results")
#s$plotresults(min~relTime)
# same without plotting: 
# drcdata<-get_lpresults2(s$results(),"min",3)


# make drc from lpresults often requires normalisation:
#drcdata$res <- (drcdata$res/drcdata$res[1])       # normalize - this is not the same for all experiments
drc_(drcdata, param=2, title="DRC curve derived from liquid period results")
tdanker/ephys2 documentation built on Aug. 11, 2019, 12:12 p.m.